package com.bluetron.supos.apps.exceptions;

/**
 * APP自定义异常
 */
public class AppException extends RuntimeException {

    private final AppError error;

    public AppException(AppError appError) {
        super("[" + appError.getCode() + "]" + appError.getMessage());
        this.error = appError;
    }

    public AppException(AppError appError, Throwable cause) {
        super("[" + appError.getCode() + "]" + appError.getMessage(), cause);
        this.error = appError;
    }

    public AppError getError() {
        return error;
    }
}
